package com.bomberdroid.protocols;

import java.util.ArrayList;

import android.widget.ArrayAdapter;

public class DataSharing {

	/* Server sharing parameters to ServerGame */
	public static Connexion Server_connexion;
	public static ArrayList<ConnectedThread> Server_clients;
	public static int Server_map;
	
	/* Client sharing parameters to ClientGame */
	public static Connexion Client_connexion;
	public static ConnectedThread Client_server;
	public static ArrayAdapter<String> Client_playersList;
	public static int Client_map;
	
	/** String for communications from Server or form Client
	 * 
	 * Code From Client to Server 
	 * 0     (Client left the game)
	 * 1;p;x (player p moves in direction x[0,1,2,3,4,5,6,7,8])
	 * 2;p   (player p stop)
	 * 3;p   (player p posing bombs)
	 * 4;p   (player p stop posing bombs)
	 * 
	 * Code From Server to Client
	 * 0       (Host left and game ends)
	 * 1;p;d   (player p moves in direction d[0,1,2,3,4,5,6,7,8])
	 * 2;p;x;y (set player p to x;y)
	 * 3;p;x;y (player p posing bombs in x;y)
	 * 4;x;y   (bombe in x;y exploded)
	 * 5;t;x;y (bonus of type t appeared in x;y)
	 * 6;p;x;y (player p took bonus in x;y) 
	 * 7;p     (player p died)
	 * 8;p     (player p left)
	 */
	public static String message = "";
}
